<template>
    <el-dialog title="图片预览" :visible.sync="dialogVisible" width="1000px" :before-close="close">
        <div class="flex jus-c">
            <img :src="url" alt="">
        </div>
        <span slot="footer" class="dialog-footer" >
            <el-button @click="dialogVisible = false">取 消</el-button>
            <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
        </span>
    </el-dialog>
</template>
<script>
export default {
    name:'preview-dialog',
    data(){
        return{
            dialogVisible:false,
        }
    },
    props:{
        url:String
    },
    methods:{
        setImg(url){
            this.url = url
        },
        show(){
            this.dialogVisible = true
        },
        close(){
            this.dialogVisible = false
        }
    },
}
</script>